var app = new Vue({
		  el:"#player",
		  data:{
			  query:'',
			  musicList:[],
			  musicUrl:'',
			  musicPic:'',
			  hotComments:[],
			  isplaying:false,
			  isShow:false,
			  mvUrl:''
		  },
		  methods:{
			  searchMusic:function(){
				  var that = this;
				  axios.get("https://autumnfish.cn/search?keywords="+this.query)
				  .then(function(response){
					  // console.log(response);
					  that.musicList=response.data.result.songs;
				  },function(err){
				  })
			  },
			  playMusic:function(id){
				  var that = this;
				  axios.get("https://autumnfish.cn/song/url?id="+id)
				  .then(function(response){
					  //console.log(response);
					  that.musicUrl=response.data.data[0].url;
				  },function(err){
				  });
				  axios.get("https://autumnfish.cn/song/detail?ids="+id)
				  .then(function(response){
					  // console.log(response);
					  that.musicPic=response.data.songs[0].al.picUrl;
				  },function(err){
					  
				  });
				  axios.get("https://autumnfish.cn/comment/hot?type=0&id="+id)
				  .then(function(response){
					  // console.log(response);
					  that.hotComments=response.data.hotComments;
				  },function(err){
				  })
			  },
			  
			  play:function(){
				  // console.log("play");
				  this.isplaying=true;
			  },
			  pause:function(){
				  // console.log("pause");
				  this.isplaying=false;
			  },
			  mvPlay:function(mvid){
				  var that =this;
				  axios.get("https://autumnfish.cn/mv/url?id="+mvid)
				  .then(function(response){
				  	 // console.log(response);
					 that.isShow=true;
					 that.mvUrl=response.data.data.url;
				  },function(err){
				  					  
				  })
			  },
			  closeMv:function(){
				  this.isShow=false;
				  this.mvUrl='';
			  }
		  }
	  })